import request from '@/utils/request';
import { Form } from 'element-ui';

export function listData(query) {
  return request({
    url: `/user-manager/user-gift-bag${query}`,
    method: 'get',
  });
}

export function listTypeData() {
  return request({
    url: `/user-manager/user-gift-bag/select/list`,
    method: 'get',
  });
}

export function postAddData(form) {
  return request({
    url: `/user-manager/user-gift-bag`,
    method: 'post',
    data:form,
  });
}

export function putEditData(id,form) {
    return request({
      url: `/user-manager/user-gift-bag/${id}`,
      method: 'put',
      data:form,
    });
  }

export function deleteData(form) {
    return request({
        url: `/user-manager/user-gift-bag`,
        method: 'delete',
        data:form,
    });
}

export function postGiveData(id,form) {
    return request({
      url: `/user-manager/user-gift-bag/send/${id}`,
      method: 'post',
      data:form,
    });
  }